package model;

import java.util.Vector;

public class BeanQuestionsRepondues {

	private Vector<QuestionRepondue> listeQuestionsRepondues;
	
	public BeanQuestionsRepondues() {
		this.listeQuestionsRepondues = new Vector<QuestionRepondue>();
	}

	public BeanQuestionsRepondues(
			Vector<QuestionRepondue> listeQuestionsRepondues) {
		this.listeQuestionsRepondues = listeQuestionsRepondues;
	}

	public Vector<QuestionRepondue> getListeQuestionsRepondues() {
		return listeQuestionsRepondues;
	}

	public void setListeQuestionsRepondues(Vector<QuestionRepondue> listeQuestionsRepondues) {
		this.listeQuestionsRepondues = listeQuestionsRepondues;
	}
	
	public void add(QuestionRepondue questionRepondue){
		listeQuestionsRepondues.add(questionRepondue);
	}
	
	public void createFake(){
		BeanQuestions beanQuestionTest = new BeanQuestions();
		try {
			beanQuestionTest.createListeQuestion();
			Vector<Question> listeTest = beanQuestionTest.getListeQuestion();
			
			for (Question q : listeTest) {
				QuestionRepondue qr = new QuestionRepondue(q);
				qr.addReponse(q.getListeReponses().get(0));
				this.add(qr);
			}
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
